<template>
    <div class="xtx-bread-item">
        <RouterLink v-if="to" :to="to">
            <slot />
        </RouterLink>
        <span v-else>
            <slot />
        </span>
    </div>
</template>

<script>
    export default {
        name: 'XtxBreadItem',
        props: {
            to: {
                type: [String, Object],
                default: ''
            },
        }
    }
</script>

<style  lang='less'>
    .xtx-bread-item {
        a {
            color: #666;
            transition: all .4s;

            &:hover {
                color: @xtxColor;
            }
        }
    }

    i {
        font-size: 12px !important;
        margin-left: 5px;
        margin-right: 5px;
        line-height: 22px;
    }
</style>